package com.sc.VenusQueryBeta.model.account.cunka;

import com.hengjun.kingstar.sdk.base.BaseModel;
import com.hengjun.kingstar.sdk.helper.RetrofitCreateHelper;
import com.hengjun.kingstar.sdk.helper.RxHelper;
import com.sc.VenusQueryBeta.api.Host;
import com.sc.VenusQueryBeta.api.account.AccountApi;
import com.sc.VenusQueryBeta.contract.account.cunka.CunKaContract;
import com.sc.VenusQueryBeta.model.bean.account.AccountList;
import com.sc.VenusQueryBeta.model.bean.account.AllRoomListBean;
import com.sc.VenusQueryBeta.model.bean.account.CurrencyListBean;

import io.reactivex.Observable;

/**
 * Created by SC-02 on 2018/9/19.
 * 存卡明细model 继承Basemodel 并且实现契约累的model方法
 */

public class CunKaModel extends BaseModel implements CunKaContract.ICunKaModel {
    /**
     * 实例化对象
     */
    public static CunKaModel newInstance(){
        return new CunKaModel();
    }
        //查询厅
//    @Override
//    public Observable<AllRoomListBean> queryAllRoomList(String serverAddress, String projectName, int serverPort) {
//        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").queryAllRoomList().compose(RxHelper.<AllRoomListBean>rxSchedulerHelper());
//    }
//      //子户口
//    @Override
//    public Observable<AccountList> queryZiHuList(String serverAddress, String projectName, int serverPort, int clientindex, int roomid, String roomyear, String roommonth, String recognitionValue, String depositType) {
//        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").
//                queryClientReserved02(clientindex,roomyear,roommonth,recognitionValue,depositType).compose(RxHelper.<AccountList>rxSchedulerHelper());
//    }
        //查询币种
    @Override
    public Observable<CurrencyListBean> queryAllCurrencyList(String serverAddress, String projectName, int serverPort) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").queryCurrencyList().compose(RxHelper.<CurrencyListBean>rxSchedulerHelper());
    }
        //子户口
    @Override
    public Observable<AccountList> queryZiHuList(String serverAddress, String projectName, int serverPort, int clientindex, String roomyear, String roommonth, String recognitionValue, String depositType,String currencynameCN) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").
                queryClientReserved02(clientindex,roomyear,roommonth,recognitionValue,depositType,currencynameCN).compose(RxHelper.<AccountList>rxSchedulerHelper());

    }
}
